﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class DynamicData_FieldTemplates_IG_Decimal_WebCurrency : System.Web.DynamicData.FieldTemplateUserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected override string ConvertFieldValueToString(object fieldValue)
    {
        //Quick and easy way to format display values when not in edit mode.
        //This may be overkill for a simple currency format, but
        //this technique would work very well with more complex masks, etc.
        Infragistics.WebUI.WebDataInput.WebCurrencyEdit edit = new Infragistics.WebUI.WebDataInput.WebCurrencyEdit();
        edit.Value = fieldValue;
        return edit.Text;
    }
}
